Allow retrying git commits without signing when signing fails#4219
Allow retrying git commits without signing when signing fails#4219tim-smart wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new feature with user-facing dialogs and recovery workflows for commit signing failures. The changes span mobile, web, and server layers with new error classification logic and a You can customize Macroscope's approvability policy. Learn more. |
2de8119 to
779bf4e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 779bf4e. Configure here.
| const failure: E | VcsActionRemoteFailureError = | ||
| terminal?.kind === "action_failed" ? remoteFailure(terminal) : error; | ||
| return Effect.fail<E | VcsActionRemoteFailureError>(failure); | ||
| }), |
There was a problem hiding this comment.
Success lost after stream error
Medium Severity
The new Effect.catch prefers a terminal action_failed over a trailing stream error, but still fails when action_finished was already received. A successful stacked action (including an unsigned retry) can surface as a failure if the RPC stream errors after the terminal event, so the UI can prompt another attempt and create a duplicate commit.
Reviewed by Cursor Bugbot for commit 779bf4e. Configure here.
| }); | ||
| currentHookName = null; | ||
| } | ||
| yield* finalizeUnattributedOutput(sawCommitHook); |
There was a problem hiding this comment.
Hookless failures hide git stderr
Medium Severity
Unattributed commit output is buffered while no hook is active, then flushed only when sawCommitHook is true. In repos without commit hooks, non-signing commit failures never emit those stderr lines as progress, so the UI keeps a generic “Git command exited with a non-zero status” message instead of the underlying git diagnostic.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 779bf4e. Configure here.
| disableCommitSigning: true, | ||
| skipDefaultBranchPrompt: true, | ||
| progressToastId: resolvedProgressToastId, | ||
| }); |
There was a problem hiding this comment.
Web retry skips branch sync
Medium Severity
Unsigned retry after a featureBranch signing failure omits featureBranch, so a successful retry returns branch.status: "skipped_not_requested". Web only syncs thread metadata via syncThreadBranchAfterGitAction when a branch was created in that same result, and this retry path does not refresh status or sync the current ref. Mobile handles this with syncCurrentBranchOnSuccess, so web can leave the thread on the old branch while git is already on the feature branch.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 779bf4e. Configure here.
- Detect commit signing failures across server and client - Let stacked git actions retry once with signing disabled - Preserve unsigned commit behavior in commit, push, and PR flows
- Prevent stale action controls from appearing on Git progress toasts
779bf4e to
1ebb4e4
Compare


Previously, when git signing failed (due to non-interactive environments etc),
the git commit would be aborted.
With this change, it allows you to retry with signing disabled.
Note
Medium Risk
Touches commit execution, error classification, and RPC contracts across server and clients; incorrect signing detection could mis-prompt retries, but unsigned retry is explicit and scoped per attempt.
Overview
When a stacked git commit fails because GPG/SSH signing cannot run (common in non-interactive environments), clients can retry the same action with signing disabled instead of stopping cold.
The server classifies signing failures from commit stderr (with hook failures excluded), surfaces
failureKind: commit_signing_failedon progress/errors, and runsgit commit --no-gpg-signwhendisableCommitSigningis set. Unsigned retries after a feature branch was already created do not create another branch. Hook progress attribution during commits is tightened so multi-hook output is not mislabeled.Web shows a “Retry without signing” action on the error toast; mobile shows the same choice via
Alert.buildUnsignedCommitRetryInputkeeps action, message, and file paths while forcing the unsigned flag.Reviewed by Cursor Bugbot for commit 1ebb4e4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Allow retrying git commits without signing when commit signing fails
isCommitSigningFailuredetection by matching GPG, pinentry, and SSH signer error patterns in commit stderr output in GitVcsDriverCore.ts.failureKindfield ('unknown'|'commit_signing_failed') onGitCommandErrorandaction_failedprogress events, with a default of'unknown'for backwards compatibility.buildUnsignedCommitRetryInputconstructs a retry payload withdisableCommitSigning: truewhile preserving the original action, commit message, and file paths.--no-gpg-signto the git commit invocation whendisableCommitSigningis set, propagated from the contract layer through the server to the git core.Macroscope summarized 1ebb4e4.